<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>会员列表</title>
	<link href='Public/hdjs/hdjs.css' rel='stylesheet' media='screen'>
	<link href='Public/Admin/css/mod.article.css' rel='stylesheet' media='screen'>
	<link href='Public/Admin/css/mod.base.css' rel='stylesheet' media='screen'>
	<link href='Public/Admin/css/lhgcalendar.css' rel='stylesheet' media='screen'>
    <script type='text/javascript' src='Public/Admin/js/jquery-1.8.2.min.js'></script>
    <script type='text/javascript' src='Public/hdjs/hdjs.min.js'></script>
    <script type='text/javascript' src='Public/Admin/js/mod.base.js'></script>
    <script type='text/javascript' src='Public/Admin/js/mod.article.js'></script>
    <script type='text/javascript' src='Public/hdjs/lhgcalendar.min.js'></script>
</head>
<body>

	<form class="hd-form" method="get" action="javascript:void(0);">
		<div class="search">
			注册时间：
			<input id="begin_time" placeholder="开始时间" readonly="readonly" class="hd-w80" type="text" value="<?php echo Q('get.st','')?>" name="search_begin_time">
			<script>
				$('#begin_time').calendar({
					format : 'yyyy-MM-dd'
				});
			</script>
			-
			<input id="end_time" placeholder="结束时间" readonly="readonly" class="hd-w80" type="text" value="<?php echo Q('get.et','')?>" name="search_end_time">
			<script>
				$('#end_time').calendar({
					format : 'yyyy-MM-dd'
				});
			</script>

			&nbsp;&nbsp;&nbsp;
				<select name="role_id" class="hd-w100" id="role_id">
					<?php foreach ($roleData as $v){?>
						<option value="<?php echo $v['id']?>" <?php if($v['id']==$_GET['role_id']){?>
                 selected="selected" 
               <?php }?> ><?php echo $v['name']?></option>
					<?php }?>
				</select>
			&nbsp;&nbsp;&nbsp;
					关键字：
			<input class="hd-w200" type="text" placeholder="请输入用户名..." value="<?php echo Q('keyword','')?>" name="keyword" id="keyword">
			<button class="hd-btn hd-btn-xm" type="submit">搜索</button>
		</div>
	</form>
	<script type="text/javascript">
		$(function(){
			$(".hd-form").submit(function() {
				var startime=$("#begin_time").val();
				var endtime=$("#end_time").val();
				var role_id=$("#role_id").val();
				var keyword=$("#keyword").val();
				location.href="index.php?m=Admin&c=Admin&a=index&st="+startime+"&et="+endtime+"&role_id="+role_id+"&keyword="+keyword;
			});
		})
	</script>
	<div class="hd-menu-list">
		<ul>
			<li class="active">
				<a href="javascript:;">管理员列表</a>
			</li>
			<li>
				<a href="<?php echo U('Admin/add')?>" >添加管理员</a>
			</li>
			<!-- <li>
				<a href="{:U('Admin/export',array('role'=>$_GET['role']))}" >导出会员</a>
			</li> -->

		</ul>
	</div>
		<!-- <div class="hd-title-header">温馨提示</div>
	<div class="help">
	    <ul>
	        <li>
	          会员列表
	        </li>
	    </ul>
	</div> -->
	<form action = '<?php echo U("Admin/beachdelete")?>' method='post' name="operationForm">
		<table class="hd-table hd-table-list hd-form">
			<thead>
				<tr>
					<td class="hd-w30">
						<input type="checkbox" id="selectAllContent"/>
					</td>
					<td class="hd-w30">UID</td>
					<td>用户名</td>
					<td class="hd-w80">登录次数</td>
					<td class="hd-w80">注册时间</td>
					<td class="hd-w80">最近登录</td>
					<td class="hd-w80">登录IP</td>
					<td class="hd-w50">状态</td>
					<td class="hd-w120">操作</td>
				</tr>
			</thead>
			<?php if($data){?>
                
				<?php foreach ($data as $v){?>
					<tr>
						<td class="hd-w30">

							<input <?php if($v['aid']==1){?>
                disabled='disabled'
               <?php }?> type="checkbox"  name="uid[<?php echo $v['aid']?>]" value="<?php echo $v['aid']?>"/>
						</td>
						<td class="hd-w30"><?php echo $v['aid']?></td>
						<td class="hd-w30"><?php echo $v['adminaccount']?></td>
						<td><?php echo $v['times']?></td>
						<td class="hd-w50"><?php echo date('Y-m-d H:i:s',$v['registertime'])?></td>
						<td class="hd-w100"><?php if($v['logintime']){?>
                <?php echo date('Y-m-d H:i:s',$v['logintime'])?><?php }else{?>未登录
               <?php }?></td>
						<td class="hd-w80"><?php echo $v['loginip']?></td>
						<td class="hd-w80"><?php if($v['islock']){?>
                锁定<?php }else{?>正常
               <?php }?></td>
						<td class="hd-w120">
							<?php if($v['aid']!=1){?>
                
							<a href="<?php echo U('Admin/edit',array('aid'=>$v['aid']))?>">编辑</a>
							|
							<a href="javascript:;" onclick="del_modal('<?php echo U('Admin/del',array('aid'=>$v['aid']))?>')">删除</a>
							
               <?php }?>

						</td>
					</tr>
				<?php }?>
			<?php }else{?>
				<tr>
					<td colspan="9">没有找到符合的记录</td>
				</tr>
			
               <?php }?>

		</table>
		<div class="hd-page"></div>

		<input type="button" class="hd-btn hd-btn-xm select_all"  value="全选" />

		<input type="button" class="hd-btn hd-btn-xm operation"  value="批量删除" name="update_del"/>

		<input type="button" class="hd-btn hd-btn-xm operation"  value="锁定" name="update_check_lock"/>
		<input type="button" class="hd-btn hd-btn-xm operation"  value="取消锁定" name="update_cancle_lock"/>

	</form>

</body>
</html>